package org.binglan.youziyuepai.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.binglan.youziyuepai.entity.Occupation;
import org.binglan.youziyuepai.service.OccupationService;
import org.binglan.youziyuepai.utils.ResponseVoUtils;
import org.binglan.youziyuepai.vo.ResponseVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: sanjin
 * @date: 2019/4/14 15:09
 */
@Api(tags = "约拍职业相关接口")
@RestController
@RequestMapping("/occupation")
public class OccupationController {

    @Autowired
    OccupationService occupationService;

    @ApiOperation(value = "获取所有约拍职业", notes = "获取所有约拍职业")
    @GetMapping("")
    public ResponseVo getAllOccupation() {
        List<Occupation> occupations = occupationService.queryAllOccupation();
        return ResponseVoUtils.success(occupations);
    }
}
